<?php get_header();

global $post_id;
$cs_layout = '';
$cs_audio = get_post_meta($post->ID, "cs_audio", true);
	if ( $cs_audio <> "" ) {
		$xmlObject = new SimpleXMLElement($cs_audio);
			$cs_layout = $xmlObject->cs_layout;
			$cs_sidebar_left = $xmlObject->cs_sidebar_left;
			$cs_sidebar_right = $xmlObject->cs_sidebar_right;
	}
				if ( $cs_layout == "left" ) {
				$cs_layout = "two-thirds column right";
				$show_sidebar = $cs_sidebar_left;
			}
			else if ( $cs_layout == "right" ) {
				$cs_layout = "two-thirds column left";
				$show_sidebar = $cs_sidebar_right;
			}
			else $cs_layout = "sixteen columns left";
	?>
		<div class="container row">
	        <div class="<?php if(isset($cs_layout)) echo $cs_layout;?>">
            

			<?php get_template_part( 'loop', 'single_audios' );?>

			</div><!-- #content -->
         <!-- two-thirds end -->
            <?php if($cs_layout != "sixteen columns left"){?>
            <!--Sidebar Start-->
            
                <div class="one-third column left">
                    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar($show_sidebar) ) : ?>
                    <?php endif; ?>   
                </div>
            <?php }?>
        </div><!-- #container -->
        <div class="clear"></div>

<?php get_footer(); ?>
<div class="clear"></div>
